Open Library - Perform Book Search
(16 actions, 14 KB)
0 Comment
• https://openlibrary.org/dev/docs/api/search • https://openlibrary.org/search/howto
1 Split Text
[Shortcut Input]
by
Custom
»
2
3
TextCustomSeparator
:
|
\u{space}
2 Get First Item from List
[1 Split Text]
➔ author
»
4
3 Get
Last Item
from List
[1 Split Text]
➔ title
»
4 Text »
7
9
title:
[3 title]
-summary author:
[2 author]
5 Detect Language of
[Shortcut Input]
»
6 If
[5 Language]
is
Chinese
7 Text
[4 Text]
language:chi
8 Otherwise
9 Text
[4 Text]
language:eng
10 End If »
11 Dictionary »
{ "q": "
[10 If Result]
", "limit": "1" }
12 ToolboxProForShortcuts > CreateQueryItemIntent »
dictionary
:
[11 Dictionary]
inputType
:
dictionary
13 ToolboxProForShortcuts > BuildURLIntent »
path
:
/search.json
host
:
openlibrary.org
queryItems
:
[12 Query Item]
14 Get Contents of URL
[13 URL]
»
RequestVariable
:
[? Shortcut Result]
HTTPHeaders
:
{}
ShowHeaders
:
true
HTTPMethod
:
GET
HTTPBodyType
:
File
15 Stop and Output
[14 Contents of URL
as Dictionary.docs
]